import request from '@/api/request';

/**
 * 分页
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const directMsgPageApi = query => {
    return request({
        url: '/api/im/direct/msg/page',
        method: 'get',
        params: query,
        isLoading: true
    });
};

/**
 * 编辑消息状态
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const directMsgEditMsgStatusApi = query => {
    return request({
        url: '/api/im/direct/msg/editMsgStatus',
        method: 'put',
        params: query,
        isLoading: true
    });
};

/**
 * 详情
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const directMsgDetailApi = query => {
    return request({
        url: '/api/im/direct/msg/getDetail',
        method: 'get',
        params: query,
        isLoading: true
    });
};

/**
 * 删除
 * @param {*} query 参数
 * @returns 返回Promise对象
 */
export const directMsgRemoveApi = query => {
    return request({
        url: '/api/im/direct/msg/removeByIds',
        method: 'delete',
        params: query,
        isLoading: true
    });
};
